/* 
 * 素描风格 CSS - 受 Wired Elements 启发
 * 用于创建手绘风格的 UI 元素
 */

/* 素描风格边框 */
.wired-border {
  position: relative;
  background: white;
  border-radius: 4px;
  overflow: visible;
}

.wired-border::before {
  content: "";
  position: absolute;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  top: -4px;
  left: -4px;
  background: transparent;
  border-radius: 6px;
  pointer-events: none;
  /* 使用 SVG 路径作为边框 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 100 100' fill='none' stroke='%23000' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2,5 Q3,2 6,2 L94,2 Q97,3 98,5 L98,95 Q97,98 94,98 L6,98 Q3,97 2,95 Z' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  filter: url('#wired-filter');
}

/* 素描风格输入框 */
.wired-input {
  position: relative;
  border: none !important;
  background: white;
  border-radius: 0 !important;
  padding: 8px 10px;
  margin-bottom: 10px;
  outline: none !important;
  box-shadow: none !important;
}

.wired-input::before {
  content: "";
  position: absolute;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  top: -3px;
  left: -3px;
  background: transparent;
  pointer-events: none;
  /* 使用 SVG 路径作为边框 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 100 30' fill='none' stroke='%23000' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2,2 L98,2 L98,28 L2,28 Z' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  filter: url('#wired-filter');
  z-index: 1;
}

/* 素描风格按钮 */
.wired-button {
  position: relative;
  border: none !important;
  background: #3b82f6;
  color: white;
  border-radius: 0 !important;
  padding: 8px 16px;
  outline: none !important;
  box-shadow: none !important;
  transition: all 0.2s;
}

.wired-button:hover {
  background: #2563eb;
}

.wired-button::before {
  content: "";
  position: absolute;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  top: -3px;
  left: -3px;
  background: transparent;
  pointer-events: none;
  /* 使用 SVG 路径作为边框 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 100 30' fill='none' stroke='%23000' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2,2 Q3,1 5,2 L95,2 Q97,1 98,2 L98,28 Q97,29 95,28 L5,28 Q3,29 2,28 Z' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  filter: url('#wired-filter');
  z-index: 1;
}

/* 素描风格复选框 */
.wired-checkbox {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
}

.wired-checkbox::before {
  content: "";
  position: absolute;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  top: -2px;
  left: -2px;
  background: transparent;
  pointer-events: none;
  /* 使用 SVG 路径作为边框 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 20 20' fill='none' stroke='%23000' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2,2 L18,2 L18,18 L2,18 Z' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  filter: url('#wired-filter');
  z-index: 1;
}

/* 素描风格链接 */
.wired-link {
  position: relative;
  display: inline-block;
  color: #3b82f6;
  text-decoration: none;
}

.wired-link::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: transparent;
  /* 使用 SVG 路径作为下划线 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 100 2' fill='none' stroke='%233b82f6' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M0,1 Q10,0 20,1 Q30,2 40,1 Q50,0 60,1 Q70,2 80,1 Q90,0 100,1' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  filter: url('#wired-filter');
  z-index: 1;
}
